const path = require("path");
const { deleFile } = require("../tools/deleFile");

exports.delePic = (Router) => {
	Router.delete("/delePic", (req, res) => {
		const filename = path.basename(req.query.src);
		const filePath = path.join(process.cwd(), "src/uploads", filename);
		deleFile(filePath, res);
	});
};
